<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title></title>
		<link rel="stylesheet" type="text/css" href="/SWTMS/css/template.css" />
		<script type="text/javascript" charset="utf-8">
			  function getChoose()
          { 
               var radios=document.getElementsByName("choose");
             
               for(var i=0;i<radios.length;i++)
                {
                    if(radios[i].checked==true)
                    {
                     return radios[i].value;
                    }
                }
          }
          
          function getName(){
               var x= getChoose();
               alert(x); 
                x = encodeURI(x );
                x = encodeURI(x );
               location="/SWTMS/toTaskDetail?choose="+x;
          }
          
		     function whetherExit(){
              var x=confirm("是否退出系统?");
              if(x==true){
                 location="/SWTMS/jsp/Login.jsp";
              }
          }
		</script>
	</head>
	<body>
		<div id="wrap">
			<div>
				<div>
					<div id="banner">
					</div>
					<div id="banner_bt">
						<div id="banner_left">
							当前用户：
							<font color="#E40101"><%=session.getAttribute("username")%></font> &nbsp;&nbsp;<%=session.getAttribute("role")%>
						</div>
						<div id="banner_right">
							系统当前日期：<%Date date=new Date();%><%=date.toString() %>&nbsp;&nbsp;
						</div>
					</div>
				</div>
				<div id="content">
					<div id="navigation">
						<ul>
							<li>
								<a href="/SWTMS/showTaskList">查看任务</a>
							</li>
							<li>
								<a href="/SWTMS/toNewTask">制订任务</a>
							</li>
							<li>
								<a href="/SWTMS/toWaitDoneTask">调整任务</a>
							</li>
							<li>
								<a href="/SWTMS/toTrackTask">跟踪任务</a>
							</li>
							<li>
								<a href="/SWTMS/showStaffList">查看人员</a>
							</li>
							<li>
								<a href="javascript:whetherExit()">退出系统</a>
							</li>
						</ul>
						<img src="/SWTMS/img/nav_bg1.gif" />
					</div>
					<div id="content_right">
						<br />
						<br />
						<div class="btwz">
							任务详细信息
						</div>
						<br>
						<table cellspacing="1" class="table">
							<tr >
								<td class="tb_top">
									<strong>任务名称</strong>
								</td>
								<td class="tb_mid" colspan="7">
									${task.taskname}
								</td>
							</tr>
							<tr height="40">
								<td class="tb_top">
									<strong>任务描述</strong>
								</td>
								<td class="tb_mid" colspan="7">
									${task.describe}
								</td>
							</tr>
							<tr>
								<td class="tb_top">
									<strong>开始时间</strong>
								</td>
								<td class="tb_mid" colspan="3">
									${task.beginTime}
								</td>
								<td class="tb_top">
									<strong>结束时间</strong>
								</td>
								<td class="tb_mid" colspan="3">
									${task.endTime}
								</td>
							</tr>
							<tr>
								<td class="tb_top">
									<strong>实际开始时间</strong>
								</td>
								<td class="tb_mid" colspan="3">
									${task.realBeginTime}
								</td>
								<td class="tb_top">
									<strong>实际结束时间</strong>
								</td>
								<td class="tb_mid" colspan="3">
									${task.realEndTime}
								</td>
							</tr>
							<tr>
								<td class="tb_top">
									<strong>实施人</strong>
								</td>
								<td class="tb_mid" colspan="3">
									${task.mgr.username}
								</td>
								<td class="tb_top">
									<strong>任务状态</strong>
								</td>
								<td class="tb_mid" colspan="3">
									${task.state}
								</td>
							</tr>
						</table>
						<p align=right style="padding-right: 30px">
							<input type="button" class="button" value="返回 &raquo"
								onclick="location='/SWTMS/showTaskList'">
						</p>
							<hr / >
							
							<div class="btwz">
						               实施计划
						    </div>
						<br>
						<table cellspacing="1" class="table">
								<tr class="table_header">
									<td valign="middle" align="left">
										计划名称
									</td>
									<td valign="middle" align="left">
										完成状态
									</td>
									<td valign="middle" align="left">
										是否反馈
									</td>
									<td valign="middle" align="left">
										开始时间
									</td>
									<td valign="middle" align="left">
										结束时间
									</td>
									<td valign="middle" align="left">
									<br></td>
								</tr>
							     
							    <c:forEach items="${task.plans}" var="plan" >
								   <tr class="row2" onMouseOver="this.className='row1'"
									onMouseOut="this.className='row2'">
								    <td valign="middle" align="left">
										${plan.planname}
									</td>
								    <td valign="middle" align="left">
										${plan.state}
									</td>
								    <td valign="middle" align="left">
										${plan.whetherreturn}
									</td>
									<td valign="middle" align="left">
										${plan.startTime}
									</td>
									<td valign="middle" align="left">
										${plan.endTime}
									</td>
									<td valign="middle" align="left">
										<input type="radio" name="choose" onClick="getRadio('D001');" value="${plan.id}"/>
									</td>
									</tr>
								</c:forEach> 
						</table>
						<p align="right">
							<input type="button" class="button" value="详细信息"
								onClick="getName()" />
						</p>
						<br />
						<br />
					
					</div>
					
				</div>
				
			</div>
			
			<div id="footer">
				<div align="center" id="footer_bg">
				</div>
			</div>
			
		</div>
	</body>
</html>
